package com.zmn.plat.persistence.interfaces.user;

import com.zmn.common.dto.StatusDTO;
import com.zmn.plat.model.entity.user.UserDevice;
import com.zmn.plat.model.entity.user.UserDeviceQuery;

import java.util.List;

/**
 * @author nowind
 * @since 17/07/31 11:17
 */
public interface UserDeviceDao {


    UserDevice findByKey(Integer deviceId);

    UserDevice findByQuery(UserDeviceQuery query);

    List<UserDevice> listPageByQuery(UserDeviceQuery query);

    List<UserDevice> listByQuery(UserDeviceQuery query);

    Integer countByQuery(UserDeviceQuery query);


    Integer updateStatus(UserDevice userDevice);
    Integer updateStatusBatch(StatusDTO dto);

    Integer updateForLogin(UserDevice userDevice);


    Integer insert(UserDevice user);


    Integer deleteByKey(Integer deviceId);

}
